<?
include("/var/www/html/new/com.inc.php");
$ordid=$_REQUEST["ordid"];
$uri=urldecode($_REQUEST["u"]);
$qrimg=$_REQUEST["qrimg"];
$ac3=$GLOBALS['_ac'];
$pw3=$GLOBALS['_pw'];
$s3 = new SoapClient(null,array("location" => "http://localhost/open/openService/pft_insideMX.php","uri" => "www.16u.com?ac_16u=$ac3|pw_16u=$pw3|auth_16u=true"));
$xml=$s3->Order_Globle_Search(0,0,0,0,"","","","","","","","",$ordid,"",0,"","","",1,0,0,1);
if(is_numeric($xml)){
	echo "<script>alert('错误".$xml."');</script>";
	exit;
}
else{
	$arr=simplexml_load_string($xml);//print_r($arr);
	if($arr->Rec[0]->UUlid==-1){
		$isL=true;
		$xml=$s3->Order_Route_Search("","","","","","","","","","",$ordid,"","","","","","","",0,1,0);
		if(!is_numeric($xml)){
			$arr=simplexml_load_string($xml);
			switch($arr->Rec[0]->UUrtype){
				case 0:	$rtype="跟团游";break;
				case 1:	$rtype="自助游";break;
				case 2:	$rtype="当地游";break;
			}
		}
		elseif($xml!=105){
			echo $xml;
		}
	}
	switch((string)$arr->Rec[0]->UUpaystatus){
		case "0": $zt="未支付";break;
		case "1": $zt="已支付";break;
		case "2": $zt="未支付";break;
	}
//	if((string)$arr->Rec[0]->UUpayinfo=="9")$zt="已支付";
	switch((string)$arr->Rec[0]->UUstatus){
		case "0": $zt.="(未使用)";break;
		case "1": $zt.="(已使用)";break;
		case "2": $zt="已过期";break;
		case "3": $zt="已取消";break;
	}
	$sel=$isL?"select buy_notes jqts,tour_notes from uu_route where pid = ".$arr->Rec[0]->UUpid:"select jqts from uu_land where id = ".$arr->Rec[0]->UUlid;
	$GLOBALS['le']->query($sel);
	$GLOBALS['le']->fetch_assoc();
	$jqts=$GLOBALS['le']->f("jqts");
}
?>
<!doctype html>
<html>
<head>
<meta charset="gb2312">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;">
<title>电子凭证</title>
<link rel="stylesheet" href="http://www.12301.cc/p/mobile/css/style.css">
</head>
<body ontouchstart>
<!--头部开始-->
<header>
  <section class="head"><h1><?=($isL?$arr->Rec[0]->UUtitle:$arr->Rec[0]->UUltitle)?></h1></section>
</header>
<!--头部结束-->

<!--订单信息开始-->
<section class="title">
	<section class="title_text"><h2>订单信息</h2></section>
    <section class="title_but">
    	<!--<ul>
        <a href="http://12301.cc/<?=$uri?>"><li>返 回</li></a>
        <a href="###" onclick="document.forms[0].submit()"><li>确认修改</li></a>
        </ul>-->
    </section>
</section>
<article class="dingdan">
	<iframe name="ifr" style="display:none;"></iframe>
  <form action="http://www.12301.cc/p/mobile/xgdd.php" target="ifr" method="post" >
	<input type="hidden" name="ordid" value="<?=$ordid?>" />
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td class="line" align="center" bgcolor="#EFF1F4"><span>订单号</span></td>
        <td class="line"><?=$arr->Rec[0]->UUordernum?></td>
        <td class="line" align="center" bgcolor="#EFF1F4"><span>状&nbsp;&nbsp;&nbsp;态</span></td>
        <td class="line"><?=$zt?></td>
      </tr>
      <tr>
        <td class="line" align="center" bgcolor="#EFF1F4"><span><?=($isL?"线路类型":"票&nbsp;&nbsp;&nbsp;类")?></span></td>
        <td class="line"><?=($isL?$rtype:$arr->Rec[0]->UUttitle)?></td>
        <td class="line" align="center" bgcolor="#9CD2FF"><span>数&nbsp;&nbsp;&nbsp;量</span></td>
        <td class="line"><input type="text" name="num" size="8" class="inp_txt" value="<?=$arr->Rec[0]->UUtnum?>"/></td>
      </tr>
      <tr>
        <td class="line" align="center" bgcolor="#EFF1F4"><span>取票人</span></td>
        <td class="line"><?=$arr->Rec[0]->UUordername?></td>
        <td class="line" align="center" bgcolor="#EFF1F4"><span>手&nbsp;&nbsp;&nbsp;机</span></td>
        <td class="line"><?=$arr->Rec[0]->UUordertel?></td>
      </tr>
      <tr>
        <td align="center" bgcolor="#EFF1F4" ><span>有效期</span></td>
        <td colspan="3"><?=$arr->Rec[0]->UUbegintime?> -- <?=$arr->Rec[0]->UUendtime?></td>
      </tr>
    </table>
	<!-- <div id="check">
		<section class="title">分销商身份验证</section>
		<article>
			<p>账 号：<input type="text" size="12" name="pt" /></p>
			<p>密 码：<input type="password" size="12" name="ps" /></p>
			<p><button>确 定</button><button>取 消</button></p>
		</article>
	</div> -->
  </form>
</article>
<!--订单信息结束-->

<!--取票地点开始-->
<section class="title">
	<section class="title_text"><h2><?=($isL?"出行须知":"取票地点")?></h2></section>
</section>
<article class="wenzi">
	<p><?=($isL?$GLOBALS['le']->f("tour_notes"):$arr->Rec[0]->UUgetaddr)?></p>
</article>
<!--取票地点结束-->

<!--购票须知开始-->
<section class="title">
	<section class="title_text"><h2>购买须知</h2></section>
</section>
<article class="wenzi">
	<?=$jqts?>
</article>

<!--购票须知结束-->
<?$lid=$isL?"r".$arr->Rec[0]->UUpid:$arr->Rec[0]->UUlid;
include("foot.html");?>
</body>
</html>